package com.gxwy.yonghuziliao.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.gxwy.yonghuziliao.form.YongHuZiLiao;
import com.gxwy.yonghuziliao.service.YongHuZiLiaoService;

@Controller
@RequestMapping("/yonghuziliao")
public class UpdateBieMingController {

	@Autowired
	private YongHuZiLiaoService service;
	
	@RequestMapping("/changeBieMing")
	public String change(YongHuZiLiao yhzl){
		String bieming=yhzl.getZhanghubieming();
		int id=yhzl.getId();
		service.updateBieMing(bieming, id);
		return "redirect:/yonghuziliao/right";
	}
}
